package org.example;

import org.example.Mapper.studentmapper;
import org.example.config.springconfig;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

//使用 Spring 整合 Junit 专用的类加载器
@RunWith(SpringJUnit4ClassRunner.class)
//加载配置文件或者配置类
@ContextConfiguration(classes = {springconfig.class}) //加载配置类
//@ContextConfiguration(locations={"classpath:applicationContext.xml"})//
public class service {
    @Autowired
     studentmapper studentmapper;
    @Test
    public void outage() {
        studentmapper.inage(2,3);

    }
}
